package com.newproject.resmi;

import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;

public class Instrument {
	private int id;
	private int idKase;
	private float typeInstr;
	private String ShortName;
	private String Name1;	
	private String Status;
	private boolean IsBlocked;
	private float Ask;
	private float AskH;
	private byte AskChg;
	private float Bid;
	private float BidH;
	private byte BidChg;
	private float Open;
	private float OpenH;
	private float Last;
	private float LastH;
	private byte LastChg;
	private String Nin;
	private int LastVolume;
	private int LastVolumeH;
	private float Max1;
	private float Max1H;
	private float Min1;
	private float Min1H;
	private int Volume;
	private int VolumeH;
	private int VolTotal;
	private int VolTotalH;
	private int DealCnt;
	private int DealCntH;
	private float pctChg1D;
	private float pctChg1W;
	private float pctChg1M;
	private float pctChg3M;
	private float pctChg1Y;
	private float changeYTD;
	private boolean checkInList;
	private byte typeGlass;
	
	public int getId() {
		return id;
	}
	
	public int getIdKase(){
		return idKase;
	}
	
	public String getName(){
		return Name1;
	}
	
	public String getShortName() {
		return ShortName;
	}

	public byte getTypeGlass(){
		return typeGlass;
	}
	
	public String getStatus() {
		return Status;
	}
		
	public boolean isBlocked() {
		return IsBlocked;
	}
	
	public float getAsk() {
		return Ask;
	}

	public float getAskH() {
		return AskH;
	}

	public float getBid() {
		return Bid;
	}

	public float getBidH() {
		return BidH;
	}
	
	public float getLast() {
		return Last;
	}

	public float getLastH() {
		return LastH;
	}	
	
	public String getNin() {
		return Nin;
	}
	
	public float getPctChg1D() {
		return pctChg1D;
	}
		
	public String format( float a) {
		if( a != 0){
			DecimalFormatSymbols formatSymbols =  new DecimalFormatSymbols();
		    formatSymbols.setGroupingSeparator(' ');
	
		    DecimalFormat myFormatter = new DecimalFormat("###,###.##", formatSymbols);
		    return myFormatter.format(a);
		} else {
			return "-";
		}
	}
}
